﻿using System.ComponentModel.DataAnnotations;
using MediatR;
using Process.DAL;

namespace Process.Api.Application.Command
{
    public class UpdateProcessFlowCommand : IRequest<ApiResult<int>>
    {
        [Required(ErrorMessage = "工艺流程ID不能为空")]
        public int Id { get; set; }

        [Required(ErrorMessage = "工艺流程编号不能为空")]
        [StringLength(50, ErrorMessage = "工艺流程编号长度不能超过50个字符")]
        public string FlowCode { get; set; }

        [Required(ErrorMessage = "工艺流程名称不能为空")]
        [StringLength(100, ErrorMessage = "工艺流程名称长度不能超过100个字符")]
        public string FlowName { get; set; }

        [StringLength(20, ErrorMessage = "工序数量长度不能超过20个字符")]
        public string FlowNumber { get; set; }

        [Required(ErrorMessage = "负责人不能为空")]
        [StringLength(50, ErrorMessage = "负责人长度不能超过50个字符")]
        public string Responsible { get; set; }

        [Required(ErrorMessage = "所属部门不能为空")]
        [StringLength(50, ErrorMessage = "所属部门长度不能超过50个字符")]
        public string Department { get; set; }

        [Required(ErrorMessage = "状态不能为空")]
        public int Status { get; set; }

        [StringLength(500, ErrorMessage = "备注长度不能超过500个字符")]
        public string Remark { get; set; }

        [Required(ErrorMessage = "工序列表不能为空")]
        public List<int> ProcessIds { get; set; } = new List<int>();
    }
}